using BlazorAdmin.Models;
using BootstrapBlazor.Components;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace BlazorAdmin.Interface
{
    /// <summary>
    /// EmailTasks 接口
    /// </summary>
    public interface IEmailTasks
    {
        #region 默认生成的代码

        /// <summary>
        /// 保存、更新
        /// </summary>
        /// <param name="entity">实体对象</param>
        /// <returns>错误消息</returns>
        Task<string> Save(EmailTask entity);

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="query">查询参数集合</param>
        /// <returns>分页数据</returns>
        Task<QueryData<EmailTask>> Query(AppQueryOption query);

        /// <summary>
        /// 获取实例
        /// </summary>
        /// <param name="id">主键id</param>
        /// <returns>实例对象</returns>
        Task<EmailTask> Get(int id);

        /// <summary>
        /// 逻辑删除实例
        /// </summary>
        /// <param name="ids">主键id集合</param>
        /// <param name="curUser">当前用户</param>
        /// <returns></returns>
        Task<bool> Remove(List<int> ids, string curUser);

        /// <summary>
        /// 物理删除实例
        /// </summary>
        /// <param name="ids">主键id集合</param>
        /// <returns></returns>
        Task<bool> Delete(List<int> ids);

        #endregion
    }
}
